#if __ANDROID__
#include "sys.h"
#include "log.h"
#include "devinfo.h"

static void _get_manufacturer(char *buf){
    char buffer[64], *ptr;
    char *delim = " ";
    __system_property_get("ro.product.manufacturer", buffer);
    ptr = strtok(buffer, delim);
    if(strcmp(ptr,"unknown") == 0){
        __system_property_get("ro.build.user", buffer);//tcl
        ptr = buffer;
    }
    strcpy(buf, ptr);
}

void android_get_devinfo(DevInfo_t *devinfo){
    strcpy(devinfo->osType, "Android");
    _get_manufacturer(devinfo->factory);
    __system_property_get("ro.product.model", devinfo->model);
    __system_property_get("ro.build.version.incremental", devinfo->sw_version);
    __system_property_get("ro.build.version.release", devinfo->osVersion);
    strcpy(devinfo->dev_type, "TV");
}
























#endif //__ANDROID__